vhal_dir := vendor/ecarx/hardware/interfaces/automotive/vehicle/2.0

$(warning "vhal version in env is $(VHAL_VERSION)")
SOONG_CONFIG_NAMESPACES += vhal
SOONG_CONFIG_vhal += version
SOONG_CONFIG_vhal_version := $(VHAL_VERSION)

# remove for target buiild by ECARX:liang.wan start
# ifeq ($(TARGET_PRODUCT), HY11)
#     vhal_flavor := HY11
#     $(warning "rm E371 vhal Android.bp")
#     $(shell find $(vhal_dir)/E371 -name Android.bp -print0 | xargs -0 rm -f )
# else
#     vhal_flavor := E371
#     $(warning "rm HY11 vhal Android.bp")
#     $(shell find $(vhal_dir)/HY11 -name Android.bp -print0 | xargs -0 rm -f )
# endif

# $(warning "enable target vhal Android.bp, product is $(TARGET_PRODUCT)")
# dirnames := $(shell find $(vhal_dir)/$(vhal_flavor) -name Android.bp.in | xargs dirname)
# $(foreach dirname, $(dirnames), $(shell cp $(dirname)/Android.bp.in $(dirname)/Android.bp))
# $(shell ln -sf $(vhal_flavor)/default $(vhal_dir))
# $(shell cp $(vhal_dir)/$(vhal_flavor)/types.hal $(vhal_dir))
# $(shell find $(vhal_dir)/E371 -name Android.bp.in | xargs dirname | xargs -I % cp %/Android.bp.in %/Android.bp)
# remve end

# Vehicle Networks
PRODUCT_PACKAGES += android.hardware.automotive.vehicle@2.0
PRODUCT_PACKAGES += vendor.ecarx.xma.automotive.vehicle@2.0
PRODUCT_PACKAGES += vendor.ecarx.xma.automotive.vehicle@2.0-service
PRODUCT_PACKAGES += libcpp-properties
PRODUCT_PACKAGES += liblocalconfig


BOARD_SEPOLICY_DIRS += vendor/ecarx/hardware/interfaces/automotive/vehicle/sepolicy
#PRODUCT_COPY_FILES += \
    vendor/ecarx/interfaces/automotive/vehicle/2.0/default/transfer/libsomeip/vsomeip_cfg.json:$(TARGET_OUT)/vendor/etc/vsomeip_cfg.json
